Coalgebraic Semantics of an Imperative Class Based Language
نویسندگان
چکیده
We study two observational equivalences of Fickle programs. Fickle is a class-based object oriented imperative language, which extends Java with object re-classification. The first is a contextual equivalence of expressions with respect to a given program. We provide an adequate coalgebraic semantics for it, which is compositional w.r.t. the operators of the language. The second observational equivalence is defined on programs implementing the same specification, given as an abstract class. We introduce a coalgebraic description of classes which gives a sound coinduction principle for this latter equivalence. To this end we need to extend the original coalgebraic approach of H.Reichel and B.Jacobs to deal with binary methods, i.e. methods which take more than one instance of the hosting class as argument. This coalgebraic description induces in particular a coinductive observational equivalence on objects of a program, where objects (states of a class) are taken to be equal when the action of methods on them yield the same observations and equivalent next states.
منابع مشابه
Coalgebraic Semantics and Observational Equivalences of an Imperative Class-based OO-Language
Fickle is a class-based object oriented imperative language, which extends Java with object re-classification. In this paper, we introduce a natural observational equivalence on Fickle programs. This is a contextual equivalence on main methods with respect to a given sequence of class definitions, i.e. a program. To study it, we use the formal computational model for OO-programming based on coa...
متن کاملCoalgebraic Characterizations of Context-Free Languages
In this article, we provide three coalgebraic characterizations of the class of context-free languages, each based on the idea of adding coalgebraic structure to an existing algebraic structure by specifying output-derivative pairs. Final coalgebra semantics then gives an interpretation function into the final coalgebra of all languages with the usual output and derivative operations. The first...
متن کاملCoalgebraic Modal Logic in CoCasl
We extend the algebraic-coalgebraic specification language CoCasl by full coalgebraic modal logic based on predicate liftings for functors. This logic is more general than the modal logic previously used in CoCasl and supports the specification of a variety of modal logics, such as graded modal logic, majority logic, and probabilistic modal logic. CoCasl thus becomes a modern modal language tha...
متن کاملComputing with Capsules
Capsules provide a clean algebraic representation of the state of a computation in higherorder functional and imperative languages. They play the same role as closures or heapor stack-allocated environments but are much simpler. A capsule is essentially a finite coalgebraic representation of a regular closed λ-coterm. One can give an operational semantics based on capsules for a higher-order pr...
متن کاملTowards a Coalgebraic Semantics of the Ambient Calculus
Recently, various process calculi have been introduced which are suited for the modelling of mobile computation and in particular the mobility of program code; a prominent example is the ambient calculus. Due to the complexity of the involved spatial reduction, there is — in contrast to the situation in standard process algebra — up to now no satisfying coalgebraic representation of a mobile pr...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2003